//---------------------------------------------------------------------------
#include <vcl.h>
#include<stdlib.h>
#pragma hdrstop

#include "DiceGenerator.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
int numdadi=0;
int diff=0;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
    : TForm(Owner)
{
}
//---------------------------------------------------------------------------

void __fastcall TForm1::lancia(TObject *Sender)
{
    int temp;
    for(int i=0;i<numdadi;i++){
        temp=random(10)+1;
        if(temp>=diff){
            Memo1->Lines=#temp;
        }
    }
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button2Click(TObject *Sender)
{
    Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::RadioGroup1Click(TObject *Sender)
{
    numdadi=RadioGroup1;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::RadioGroup2Click(TObject *Sender)
{
    diff=RadioGroup2;
}
//---------------------------------------------------------------------------
